﻿{include file="public/header"}
<title>订单列表</title>
</head>
<style>
    .layui-layer-page .layui-layer-content {
        overflow: visible !important;
    }

</style>
<body>
<nav class="breadcrumb">
    <i class="Hui-iconfont">&#xe67f;</i> 首页
    <span class="c-gray en">&gt;</span> 推荐订单管理
    <span class="c-gray en">&gt;</span> 推荐订单列表
    <a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px"
       href="javascript:location.replace(location.href);" title="刷新"><i class="Hui-iconfont">&#xe68f;</i></a>
</nav>
<div class="page-container">
    <form method="get">
        <div class="ch-c">
            <div class="ch-form-row">
                <p>创建时间:</p>
                <input type="text" name="start_time" id="countTimestart" onfocus="selecttime(1)" size="17" class="date" 
                readonly value="<?php echo isset($data['start_time'])?$data['start_time']:''?>">
                <b>-</b>
                <input type="text" name="end_time" id="countTimeend" onfocus="selecttime(2)" size="17" class="date" 
                readonly value="<?php echo isset($data['end_time'])?$data['end_time']:''?>">
            </div>
            <select name="status" class="ch-form-cSelect">
                <option value="" >订单进度</option>
                <option value="0" >待指派</option>
                <option value="1">待结单</option>
                <option value="2">待上门</option>
                <option value="3">待签约</option>
                <option value="4">待开工</option>
                <option value="5">待完工</option>
                <option value="6">待评价</option>
                <option value="7">已完成</option>
                <option value="8">已取消</option>
                <option value="9">退单</option>
                <option value="10">无效订单</option>
            </select>
            <input type="text" name="tui_jian" placeholder="推荐人姓名" class="ch-form-assignor" value="<?php echo isset($data['tui_jian'])?$data['tui_jian']:''?>">
            <input type="text" name="contacts" placeholder="联系人姓名" class="ch-form-assignor" value="<?php echo isset($data['contacts'])?$data['contacts']:''?>">
            <input type="text" name="addres" placeholder=" 联系人地址" class="ch-form-assignor" value="<?php echo isset($data['addres'])?$data['addres']:''?>">

            <button class="btn btn-success" type="submit"><i class="Hui-iconfont">&#xe665;</i> 搜索</button>
        </div>
    </form>
    <div class="mt-20">
        <div class="title-border">
            <div class="flex1">ID</div>
            <div class="flex2">订单号</div>
            <div class="flex3">来源</div>
            <div class="flex2">联系人</div>
            <div class="flex5">地址</div>
            <div class="flex3">订单状态</div>
            <div class="flex3">下单时间</div>
            <div class="flex2">下单人</div>
        </div>
        {volist name='list' id='vo'}
        <div class="title-border">
            <div class="flex1">{$vo.order_id}</div>
            <div class="flex2">{$vo.order_no}</div>
            <div class="flex3">{$vo.title}</div>
            <div class="flex2">{$vo.contacts}</div>
            <div class="flex5">{$vo['province'].$vo['city'].$vo['county'].$vo['addres']}</div>
            <div class="flex3"><span style="color: red">{$vo.states}</span></div>
            <div class="flex3">{:date('Y-m-d H:i:s',$vo.created_time)}</div>
            <div class="flex2">{$vo.tui_jian}</div>
        </div>
        {/volist}
        <div class="pages" style="float: right">{$list->render()}</div>

    </div>
</div>

{include file="public/footer"}
<script type="text/javascript">
    function selecttime(flag) {
        if (flag == 1) {
            var endTime = $("#countTimeend").val();
            if (endTime != "") {
                WdatePicker({dateFmt: 'yyyy-MM-dd', maxDate: endTime})
            } else {
                WdatePicker({dateFmt: 'yyyy-MM-dd'})
            }
        } else {
            var startTime = $("#countTimestart").val();
            if (startTime != "") {
                WdatePicker({dateFmt: 'yyyy-MM-dd', minDate: startTime})
            } else {
                WdatePicker({dateFmt: 'yyyy-MM-dd'})
            }
        }
    }


</script>
</body>
</html>